import pandas as pd

if __name__ == '__main__':
    path = r"C:\Users\lvsk\Desktop\aaa_2.csv"
    df1 = pd.read_csv(path, encoding='utf-8', sep='\t')
    test = {'操作日期': [], '客户标识': [], '操作事件': [], '航班': []}
    df2 = pd.DataFrame(test)
    index = 1
    for loc in df1.itertuples():
        if '订单' in getattr(loc, "操作事件"):
            df2[index] = loc
            index += 1
    print(df2)
